/*
 * @Description: 
 * @Author: admin
 * @Date: 2021-06-11 08:47:28
 * @LastEditors: admin
 * @LastEditTime: 2021-06-11 17:38:54
 */
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
// import My from './My';
import Login from './Login';
import reportWebVitals from './reportWebVitals';
// 判断要展示那个页面

var user = window.sessionStorage.getItem('user')

var show = <Login />
if (user !== null) {
  // 证明用户已经登录 展示主页
  show = <App />
} else {
  // show = <Register />
}


ReactDOM.render(
  <React.StrictMode>
    {show}
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
